﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Diagnostics;

namespace WcLibrary
{
    class Program
    {
        protected static readonly log4net.ILog log = log4net.LogManager.GetLogger("WcLibrary");
     
        static void Initialize()
        {
            log4net.Config.XmlConfigurator.Configure(new System.IO.FileInfo("WcLibrary.log4net.xml"));
        }

        static void Main(string[] args)
        {
            //Initialize();
            log.Info("-----------------------------------------------");

            Console.WriteLine("\nPress a key to exit...");
            while (ConsoleKey.Escape != Console.ReadKey(true).Key)
            {
            }
            log.Info("-----------------------------------------------");
        }
    }

    class MyInitializer
    {
        private static readonly MyInitializer self = new MyInitializer();
        private static readonly log4net.ILog log = log4net.LogManager.GetLogger("WcLibrary");

        private MyInitializer()
        {
            System.Console.WriteLine("Initializer()");
            log4net.Config.XmlConfigurator.Configure(new System.IO.FileInfo("WcLibrary.log4net.xml"));
        }
    }
}
